package com.impress.adapter;

import java.util.List;

import com.impress.model.Item;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public abstract class BaseItemsListAdapter extends BaseAdapter {

	protected Context mContext;
	public List<Item> mItems;
	
	public BaseItemsListAdapter(Context context, List<Item> items){
		mContext = context;
		mItems = items;
	}
	
	@Override
	public int getCount() {
		
		return mItems.size();
	}

	@Override
	public Object getItem(int position) {
		
		return mItems.get(position);
	}

	@Override
	public long getItemId(int position) {
		
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		return null;
	}
	
	public void clear(){
		if(mItems!=null && mItems.size()>0){
			mItems.clear();
		}
	}

}
